#include <stdio.h>
#include <omp.h>
#include <time.h>
#include <stdlib.h>
#include <iostream>
//编译指令
//g++ -std=c99 -fopenmp 12Dynamic.cpp -o cmake-build/12Dynamic && export OMP_NUM_THREADS=512 && time ./cmake-build/12Dynamic
using namespace std;

int main()
{
    #pragma omp parallel for schedule(dynamic,2)  shared(cout)default(none)
    for(int i=0;i<10;++i)
    {
        std::cout<<"thread id: "<<omp_get_thread_num()<<" value: "<<i<<std::endl;
    }
    return 0;
}
